import http from './http'

//获取顶部显示图
const getBanner = (name) => {
    return http.post(
        '/api/courseApi/getBannerByCateName',
        { name: name },
        { headers: { act: 'userLogin' } }
    )
}

// 获取分类
const getCourseList = (id) => {
    return http.post(
        '/api/CourseApi/getCourseList',
        { classify_id: id },
        { headers: { act: 'userLogin' } }
    )
}
// 根据不同id获取下方详情数据 
const getCateVideo = (id,limit,page) => {
    return http.post(
        '/api/CourseApi/getCateVideo',
        { course_id: id,limit,page },
        { headers: { act: 'getVideoDetail' } }
    )
} 

export {
    getBanner,
    getCourseList,
    getCateVideo

}